/**
 * Project: ld.biz.service
 * 
 * File Created at 2012-9-23
 * $Id$
 * 
 * Copyright 1999-2100 Alibaba.com Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Alibaba Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Alibaba.com.
 */
package com.liangdev.biz.dao.autocode.impl;

import java.util.List;

import com.liangdev.biz.dao.autocode.DbInfoDao;
import com.liangdev.biz.dataobject.autocode.DbInfoDO;
import com.liangdev.biz.query.autocode.DbInfoQuery;
import com.liangdev.common.base.dataobject.common.base.dao.impl.GenericDaoImpl;

/**
 * TODO Comment of DbInfoDaoImpl
 * 
 * @author chongan.wangca
 */
public class DbInfoDaoImpl extends GenericDaoImpl<DbInfoDO, DbInfoQuery> implements DbInfoDao {

    /*
     * (non-Javadoc)
     * @see
     * com.liangdev.biz.dao.autocode.DbInfoDao#getByDbType(java.lang.String)
     */
    @Override
    public List<DbInfoDO> getByDbType(String dbType) {
        DbInfoQuery dbInfoQuery = new DbInfoQuery();
        dbInfoQuery.setDbType(dbType);
        return findList(dbInfoQuery);
    }

    /*
     * (non-Javadoc)
     * @see
     * com.liangdev.common.base.dataobject.common.base.dao.impl.GenericDaoImpl
     * #getNameSpace()
     */
    @Override
    public String getNameSpace() {
        return "dbInfo";
    }

    /*
     * (non-Javadoc)
     * @see com.liangdev.biz.dao.autocode.DbInfoDao#findAll()
     */
    @SuppressWarnings("unchecked")
    @Override
    public List<DbInfoDO> findAll() {
        return getSqlMapClientTemplate().queryForList(getNameSpace() + ".findAll");
    }

}
